/*
 * Android Runner is a multiplayer GPS game fully written by Xurxo Mendez Perez
 * 
 * Copyright (C) 2009 Xurxo Mendez Perez
 *   
 * This file is part of Android Runner.
 * 
 * Android Runner is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Android Runner is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Android Runner.  If not, see <http://www.gnu.org/licenses/>.
 */

package es.sonxurxo.gpsgame.client.model.service.game;

import java.util.List;

import es.sonxurxo.gpsgame.client.model.service.to.Game;
import es.sonxurxo.gpsgame.client.model.service.to.GameCTO;
import es.sonxurxo.gpsgame.client.model.service.to.response.AnswerQuestionResponseTO;
import es.sonxurxo.gpsgame.client.model.service.to.response.GenericGameResponseTO;
import es.sonxurxo.gpsgame.client.model.service.to.response.GetItemResponseTO;
import es.sonxurxo.gpsgame.client.model.service.to.response.StartOrContinueGameResponseTO;

/**
 * 
 * @author "Xurxo Mendez Perez"
 *
 */
public interface GameService {

	public List<String> findCitiesWithGames() throws Exception;
	
	public Game findGame(String gameId) 
	throws Exception;
	
	public GameCTO findGamesByCity(String city, int startIndex, int count) 
	throws Exception;
	
	public GameCTO findGamesByLocation(int latitude, int longitude, 
			int accurate, int startIndex, int count) 
	throws Exception;
	
	public boolean joinGame(long gameId) 
	throws Exception;
	
	public boolean abandonGame(long gameId) 
	throws Exception;
	
	public StartOrContinueGameResponseTO startOrContinueGame(String login) 
	throws Exception;
	
	public GenericGameResponseTO updateLocation(int latitude, int longitude) 
	throws Exception;
	
	public GetItemResponseTO getItem(int latitude, int longitude, long itemId) 
	throws Exception;
	
	public boolean sendMessage(String receiverLogin, String body) 
	throws Exception;
	
	public AnswerQuestionResponseTO answerQuestion(long questionId, int latitude, int longitude) 
	throws Exception;
}
